<?php@define('IN_UCHOME', TRUE);
define('D_BUG', '0');//测试阶段 开启d_bug
D_BUG?error_reporting(7):error_reporting(0);
set_magic_quotes_runtime(0);

$_SGLOBAL = $_SCONFIG = $_SBLOCK = $_TPL = $_SCOOKIE = $_SN = $space = array();
//程序目录
define('S_ROOT', dirname(__FILE__).DIRECTORY_SEPARATOR);//获取WAP版本的完整路径define('PC_ROOT', dirname(__FILE__).DIRECTORY_SEPARATOR);
//基本文件
include_once(S_ROOT.'./ver.php');
if(!@include_once(PC_ROOT.'./config.php')) {
	exit("config.php is not exist");
}
include_once(S_ROOT.'./source/function_common.php');//常用函数文件
//处理REQUEST_URIif(!isset($_SERVER['REQUEST_URI'])) {  	$_SERVER['REQUEST_URI'] = $_SERVER['PHP_SELF'];	if(isset($_SERVER['QUERY_STRING'])) $_SERVER['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING'];}if($_SERVER['REQUEST_URI']) {	$temp = urldecode($_SERVER['REQUEST_URI']);	if(strexists($temp, '<') || strexists($temp, '"')) {		$_GET = shtmlspecialchars($_GET);//XSS	}}
//时间
$mtime = explode(' ', microtime());
$_SGLOBAL['timestamp'] = $mtime[1];
$_SGLOBAL['supe_starttime'] = $_SGLOBAL['timestamp'] + $mtime[0];

//GPC过滤
$magic_quote = get_magic_quotes_gpc();

//本站URL
if(empty($_SC['siteurl'])) $_SC['siteurl'] = getsiteurl();

//链接数据库 调用康盛现成的数据库类
dbconnect();

//缓存文件生成
if(!@include_once(S_ROOT.'./data/data_config.php')) {
	include_once(S_ROOT.'./source/function_cache.php');
	config_cache();
	include_once(S_ROOT.'./data/data_config.php');
}
//COOKIE$prelength = strlen($_SC['cookiepre']);foreach($_COOKIE as $key => $val) {	if(substr($key, 0, $prelength) == $_SC['cookiepre']) {		$_SCOOKIE[(substr($key, $prelength))] = empty($magic_quote) ? saddslashes($val) : $val;	}}//渠道from记录if(isset($_GET['from']))	$addurl .='&amp;from='.intval($_GET['from']);
//启用GIPif ($_SC['gzipcompress'] && function_exists('ob_gzhandler')) {
	ob_start('ob_gzhandler');
} else {
	ob_start();
}
//初始化
$_SGLOBAL['supe_uid'] = 0;
$_SGLOBAL['supe_username'] = '';
$_SGLOBAL['refer'] = empty($_POST['refer'])?'':safeurl($_POST['refer']);
//登录注册防灌水机
if(empty($_SCONFIG['login_action'])) $_SCONFIG['login_action'] = md5('login'.md5($_SCONFIG['sitekey']));
if(empty($_SCONFIG['register_action'])) $_SCONFIG['register_action'] = md5('register'.md5($_SCONFIG['sitekey']));

//整站风格
if(empty($_SCONFIG['template'])) {
	$_SCONFIG['template'] = 'default';
}
//判断用户登录状态checkauth();
$_SGLOBAL['uhash'] = md5($_SGLOBAL['supe_uid']."\t".substr($_SGLOBAL['timestamp'], 0, 6));
// 记录用户访问情况// log_uservisit();?>